// HQDemoDlg.h : header file
//

#if !defined(AFX_HQDEMODLG_H__CEDD63EB_F556_4268_8A43_D3CCF0D07BF4__INCLUDED_)
#define AFX_HQDEMODLG_H__CEDD63EB_F556_4268_8A43_D3CCF0D07BF4__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


/////////////////////////////////////////////////////////////////////////////
// CHQDemoDlg dialog

class CHQDemoDlg : public CDialog
{
//-----------------------------------------------------------------------------
protected:
	PSTOCK_HQ	m_pCurSelect;
	HANDLE		m_HQFileHandle;
	CMemFile	m_HQFile;
	PHQ_HEAD	m_pHQHead;
	HQ_LIST		m_HQList;

protected:
	int	 GetHQFile();
	BOOL IsIndex(LPCTSTR pCode);
	void InitHQList();
	void FillDetail();
	void UpdateHQ();
	void UpdateHQRecord(int nItem,PSTOCK_HQ pOne);
	void UpdateHQDetail(PSTOCK_HQ pOne);

public:
	CHQDemoDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CHQDemoDlg)
	enum { IDD = IDD_HQDEMO_DIALOG };
	CListCtrl	m_RecordList;
	CListCtrl	m_DetailList;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CHQDemoDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CHQDemoDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnDestroy();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnSeleHQItem(NMHDR* pNMHDR, LRESULT* pResult);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_HQDEMODLG_H__CEDD63EB_F556_4268_8A43_D3CCF0D07BF4__INCLUDED_)
